import java.util.Scanner;

public class Main {


public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String st1=sc.nextLine();
String st2="";
for(int i=0;i<st1.length();i++)
{
char ch=st1.charAt(i);
if(ch>=65&&ch<=90)
{
ch=(char)(155-ch);
}
st2=st2+ch;

}
System.out.println(st2);
}

}